title: “pHeatMap” author: “Lalit K. Gautam” date: “2022-11-27” output: pdf_document: default html_document: default —

knitr::opts_chunk$set(fig.width = 6, fig.height = 240)
library(pheatmap)
## Warning: package 'pheatmap' was built under R version 4.2.2
library(grid)
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.2.3
library(matrixStats)
## Warning: package 'matrixStats' was built under R version 4.2.2
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.2.3
## Warning: package 'tibble' was built under R version 4.2.3
## Warning: package 'tidyr' was built under R version 4.2.3
## Warning: package 'readr' was built under R version 4.2.3
## Warning: package 'purrr' was built under R version 4.2.2
## Warning: package 'dplyr' was built under R version 4.2.3
## Warning: package 'stringr' was built under R version 4.2.2
## Warning: package 'forcats' was built under R version 4.2.3
## Warning: package 'lubridate' was built under R version 4.2.3
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.1     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ lubridate 1.9.2     ✔ tibble    3.2.1
## ✔ purrr     1.0.1     ✔ tidyr     1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::count()  masks matrixStats::count()
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
data <-read.csv('Data_sig_only.csv')
dim(data)
## [1] 1953   13
head(data)
##               X MCI.E2f4VP16_1 MCI.E2f4VP16_2 MCI.E2f4VP16_3 MCI.siRbl2_1
## 1           Rp1       3.214168       3.164097      3.3507107    3.4181828
## 2         Rgs20       8.228287       8.287937      8.1896381    8.1700106
## 3       Gm39590       1.121027       1.268977      0.7873446    0.6265994
## 4          Sgk3      10.437536      10.430193     10.3588784    9.3440976
## 5       Ppp1r42       5.717107       5.702870      5.8732486    5.7084660
## 6 4930444P10Rik       4.613890       4.761809      4.5676766    4.4738731
##   MCI.siRbl2_2 MCI.siRbl2_3 MCI.siCTL_1 MCI.siCTL_2 MCI.siCTL_3 Control_1
## 1     3.762037     3.142427   2.7328014   2.5999585   2.7264898 2.4624593
## 2     8.167616     8.093667   7.4095729   7.5008419   7.5011841 5.6730132
## 3     0.787183     0.784302   0.6248843   0.6261654   0.6240621 0.6337082
## 4     9.299508     9.239984   8.9458815   8.8852150   8.9976405 8.5795628
## 5     5.436173     5.604101   3.9153011   4.1932959   4.3346190 3.7252545
## 6     4.331399     4.937456   3.3262811   3.1136133   3.0988097 3.0719011
##   Control_2 Control_3
## 1 2.5302994 2.4139779
## 2 5.7831867 5.3137188
## 3 0.6281471 0.6993603
## 4 8.5198598 8.5590849
## 5 3.6787813 3.6798810
## 6 3.2093496 3.1465363
data1 <- as.matrix(data[,-1])
rownames(data1) <- data[,1]
pheatmap(data1)

pheatmap(log2(data1 +1), scale = 'row')

pheatmap(log2(data1 +1), scale = 'row', row.names = TRUE)

pheatmap(log2(data1 +1), scale = 'row', row.names = TRUE, treeheight_row = 20, cutree_rows = 6)

echo = FALSE

R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.